

import UserInfo from './UserInfo';
import SellerInfo from './SellerInfo';


const AccountInfo = ({ type, accountMsg, infoKey, balanceKey, dispatch, handleJump }) => {

	const SellerInfoProps = {
		type,
		infoKey,
		balanceKey,
		dispatch,
		accountMsg
	}

	const UserInfoProps = {
		type,
		infoKey,
		balanceKey,
		dispatch,
		accountMsg,
		handleJump
	}

	return (
		<>
			{ type == '1' && <UserInfo { ...UserInfoProps } /> }
			{ type == '2' && <SellerInfo { ...SellerInfoProps} /> }
		</>
	)
}

export default AccountInfo;